﻿using System.Xml;

namespace _46_C_获取当前程序工作路径的五种方式
{
    internal class Program
    {
        static void Main(string[] args)
        {

            //string path = @"..\..\..\Student.xml";//当前目录的上一级目录 再上级目录 再上级目录的 Student.xml
            //XmlDocument doc = new XmlDocument();
            //doc.Load(path);
            //Console.WriteLine(doc.BaseURI);

            //string path=Directory.GetCurrentDirectory();
            //string path = Environment.CurrentDirectory;
            //string path=AppDomain.CurrentDomain.BaseDirectory;
            //string path=System.Windows.Forms.Application.StartupPath;//窗体才ok

            //string path = System.Windows.Froms.Application.ExecutablePath;


            Console.ReadKey();
        }
    }
}
